package com.rx.school.vo.relation;

import com.rx.core.data.RxData;
import com.rx.core.iface.RelationQuery;
import com.rx.core.util.RxUtil;
import com.rx.school.vo.SchArticleInfo;
import com.rx.school.vo.SchPresidentInfo;
import com.rx.uua.vo.UuaUserInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

@RxData
@Data
@EqualsAndHashCode(callSuper = true)
public class DoubleSchArticleInfo extends SchArticleInfo implements RelationQuery {
    Object relation;

    UuaUserInfo createUser;
    UuaUserInfo updateUser;

    @Override
    public void assignRelation(Object object) {
        this.relation = object;
    }

    @Override
    public Object obtainRelation() {
        return relation;
    }


    public static DoubleSchArticleInfo create(SchArticleInfo schArticleInfo){
        DoubleSchArticleInfo doubleTangNousInfo = new DoubleSchArticleInfo();
        RxUtil.copyProperties(schArticleInfo,doubleTangNousInfo);
        return doubleTangNousInfo;
    }
}
